using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
//using System.IO.StreamWriter;
//using System.IO.File;

namespace Rally_Dekstop
{
    public partial class Logs : Form
    {
        public Logs()
        {
            InitializeComponent();
        }

        private void button_Savelog_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button_Savelog_Click_1(object sender, EventArgs e)
        {
           SaveFileDialog Save1 = new SaveFileDialog();
           System.IO.StreamWriter writer;
           Save1.DefaultExt = ".xls";
           Save1.Filter = "Text(*.txt)|*.txt";

           if (Save1.ShowDialog() == DialogResult.OK)
           {
               writer = System.IO.File.CreateText(Save1.FileName);
               writer.Write(textBox_log.Text);
               writer.Close();
           
           }
            
        }

        private void textBox_log_TextChanged(object sender, EventArgs e)
        {

        }
        public void ViewMode(bool isViewMode)
        {
            button_Closelog.Enabled = button_Savelog.Enabled = !isViewMode;
        
        }
    }
}